package com.kgc.scd.controller;

import com.kgc.scd.producer.ArrivalRemindProducer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created On : 2022/6/17.
 * <p>
 * Author     : nainai
 * <p>
 * Description: 到货提醒业务接口
 */
@Slf4j
@RestController
public class ArrivalRemindController {

    @Autowired
    private ArrivalRemindProducer arrivalRemindProducer;

    /**
     * @author : nainai
     * @date   : 2022/6/17
     * @param  : [java.lang.String]
     * @return : boolean
     * @description : 商品到货发送消息
     */
    @PostMapping("/sendProStockRemindMsg")
    public boolean sendProStockRemindMsg(@RequestParam String proId) {
        log.info("进入sendProStockRemindMsg");
        arrivalRemindProducer.sendArrivalRemindMsg(proId);
        return true;
    }
}
